const mongoose = require('mongoose')

mongoose.set('strictQuery', true);

// 连接数据库
mongoose.connect('mongodb://127.0.0.1/personalBlogServe', { useNewUrlParser: true }).then(() => {
  console.log('数据库连接成功！');
}).catch((err) => {
  console.log('数据库连接失败！' + err);
})

module.exports = mongoose